home *** CD-ROM | disk | FTP | other *** search
/ Shareware Grab Bag / Shareware Grab Bag.iso / 007 / signal.arc / SYSINT.H < prev    next >
Encoding:
C/C++ Source or Header  |  1985-07-19  |  1.5 KB  |  42 lines

  1. /************************************************************************
  2.  
  3.   This header file contains the register structure required to call
  4.   the C86 sysint() call and a few useful functions using sysint().
  5.   Include this file using #include <sysint.h> and then use these
  6.   functions any where in your program. These will only work on the 
  7.   IBM PC or compatibles using the Computer Inovations C86 compiler. 
  8.  
  9.            Dec 1984     Mike Elkins  "C" BBS                         
  10.  
  11. *************************************************************************/
  12.  
  13. struct regval { int ax,bx,cx,dx,si,di,ds,es; } regbefore, regafter;
  14.  
  15. /* Position cursor at row x, col y  */
  16. gotoxy( x, y)
  17. int x, y;
  18. {
  19.     regbefore.ax = 0x0200;
  20.     regbefore.dx = ((x * 0x100) + y);
  21.     sysint(0x10, ®before, ®after);
  22. }
  23. /*  Clear the screen     */
  24. cls()
  25. {
  26.     regbefore.ax = 0x03;
  27.     regbefore.bx = regbefore.cx = regbefore.dx = 0;
  28.     sysint(0x10, ®before, ®after);
  29. }
  30. /* Set cursor size top x, bottom y. 0 is top and 7 is bottom on a graphic
  31.    monitor, 13 is bottom on a monocrome monitor. cursor(14,14); will turn
  32.    the cursor off, cursor(0,7); will make the cursor solid. Default size
  33.    is cursor(6,7); on a graphics monitor and cursor(12,13) on a monocrome */
  34. cursor( x, y)
  35. int x, y;
  36. {
  37.     regbefore.ax = 0x0100;
  38.     regbefore.bx = regbefore.dx = 0;
  39.     regbefore.cx = ((x * 0x100) + y);
  40.     sysint(0x10, ®before, ®after);
  41. }
  42.